var mydriver;
(function(){
    mydriver = {
        start:function(){
            driver.start();
        }
    }
})()
const driver = new Driver({
  animate: true,  // Animate while changing highlighted element
  opacity: 0.8,  // Background opacity (0 means only popovers and without overlay)
  padding: 0,    // Distance of element from around the edges
  allowClose: false, // Whether clicking on overlay should close or not
  overlayClickNext: false, // Should it move to next step on overlay click
  doneBtnText: '完成', // Text on the final button
  closeBtnText: '关闭', // Text on the close button for this step
  nextBtnText: '下一步', // Next button text for this step
  prevBtnText: '上一步', // Previous button text for this step
  showButtons: true, // Do not show control buttons in footer
  keyboardControl: true, // Allow controlling through keyboard (escape to close, arrow keys to move)
  onHighlighted:function(element){
     $(element.node).addClass("driver-class");
  },
  onDeselected:function(element){
     $(element.node).removeClass("driver-class");
  },
});
driver.defineSteps([
     {
      element: '#driver-logo-system',
      popover: {
        title: '系统信息',
        description: '包含系统logo及系统名称',
        position:'bottom'
      }
    },
    {
      element: '#driver-top-menu',
      popover: {
        title: '顶部菜单',
        description: '系统一级菜单，点击任一菜单将激活左侧二级菜单',
        position:'bottom'
      }
    },
    {
      element: '#driver-tips-system',
      popover: {
        title: '使用引导',
        description: '点击按钮后弹出系统使用引导，可根据引导提示了解系统功能布局',
        position:'left'
      }
    },
     {
      element: '#driver-openim-system',
      popover: {
        title: '即时通讯',
        description: '点击按钮进入即时通讯页面',
        position:'left'
      }
    },
    {
      element: '#driver-message-system',
      popover: {
        title: '系统消息',
        description: '点击按钮后将打开用户消息中心，可查看及操作用户收到的消息',
        position:'left'
      }
    },
    {
      element: '#driver-pull-menu',
      popover: {
        title: '下拉选项',
        description: '下拉菜单包括基本资料、修改密码、注销等操作',
        position:'left'
      }
    },
     {
      element: '#driver-tab-title',
      popover: {
        title: '顶部视图',
        description: '顶部视图展示已打开的全部菜单项，点击不同菜单项可切换显示',
        position:'bottom'
      }
    }
]);
